package com.hezuti.sns.domain;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 用户表<br>
 * @author douxiaoyu
 * 
 */
@Entity
@Table(name = "user")
public class User implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 4491828595030129694L;

	/** 用户状态-有效 */
	public static final int USER_STATUS_VALID = 1;

	/** 用户状态-无效 */
	public static final int USER_STATUS_INVALID = 0;
	
	/**用户类型-超级管理员*/
	public static final int USRE_TYPE_ADMIN=1;
	
	/**用户类型-普通类型*/
	public static final int USER_TYPE_NOMALL=2;
	
	/**用户类型-VIP*/
	public static final int USER_TYPE_VIP=3;
	
	/**有头像*/
	public static final short USER_HEAD_HAS=1;
	
	/**无头像*/
	public static final short USER_HEAD_NO=-1;
	
	/**邮箱经过验证*/
	public static final short USER_EMAIL_PROV=1;
	
	/**手机经过验证*/
	public static final short USER_MOBILE_PROV=1;
	
	/**性别： 男*/
	public static final short USER_SEX_MAN=1;
	/**性别：女*/
	public static final short USER_SEX_WOMAN=0;
	
	

	/** 字段-登录名 */
	public static final String FIELD_LOGIN_NAME = "name";

	/**字段--用户状态(暂时无用)*/
	public static final String FIELD_USR_STATUS = "user_status";
	
	/** 字段-uid */
	public static final String FIELD_UID = "id";

	/** 字段-ctime */
	public static final String FIELD_CTIME = "ctime";

	public static final String FIELD_EMAIL = "email";

	public static final String FIELD_MOBILE = "mobile";
	
	
	
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private int id;
	

	/** 类型 */
	private int utype;

	/** 状态 */
	private int user_status;

	/** 登录名 - unique index */
	private String name;

	private String password;

	private String mobile;
	
	private short mobile_state;
	
	private Date ctime;

	private String email;
	
	private short email_status;
	
	private short hasHeadPic;
	
	private String headPicName;
	
	private Date birthday;
	
	private short gender;
	
	/**
	 * 默认构造
	 */
	public User() {
		super();
	}

	/**
	 * @return the uid
	 */
	public int getId() {
		return id;
	}

	/**
	 * @param uid the uid to set
	 */
	public void setId(int id) {
		this.id = id;
	}


	public int getUtype() {
		return utype;
	}

	public void setUtype(int utype) {
		this.utype = utype;
	}

	/**
	 * @return the user_status
	 */
	public int getUser_status() {
		return user_status;
	}

	/**
	 * @param user_status the user_status to set
	 */
	public void setUser_status(int user_status) {
		this.user_status = user_status;
	}

	

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the password
	 */
	public String getPassword() {
		return password;
	}

	/**
	 * @param password the password to set
	 */
	public void setPassword(String password) {
		this.password = password;
	}

	/**
	 * @return the mobile
	 */
	public String getMobile() {
		return mobile;
	}

	/**
	 * @param mobile the mobile to set
	 */
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	/**
	 * @return the ctime
	 */
	public Date getCtime() {
		return ctime;
	}

	/**
	 * @param ctime the ctime to set
	 */
	public void setCtime(Date ctime) {
		this.ctime = ctime;
	}

	/**
	 * @return the email
	 */
	public String getEmail() {
		return email;
	}

	/**
	 * @param email the email to set
	 */
	public void setEmail(String email) {
		this.email = email;
	}

	public short getHasHeadPic() {
		return hasHeadPic;
	}

	public void setHasHeadPic(short hasHeadPic) {
		this.hasHeadPic = hasHeadPic;
	}

	public String getHeadPicName() {
		return headPicName;
	}

	public void setHeadPicName(String headPicName) {
		this.headPicName = headPicName;
	}

	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	
	public short getGender() {
		return gender;
	}

	public void setGender(short gender) {
		this.gender = gender;
	}

	public short getMobile_state() {
		return mobile_state;
	}

	public void setMobile_state(short mobile_state) {
		this.mobile_state = mobile_state;
	}

	public short getEmail_status() {
		return email_status;
	}

	public void setEmail_status(short email_status) {
		this.email_status = email_status;
	}
	
	

}
